- /* sxcbrcdx.cpp by K.Tsuru */
- // function ID = 511 BRADIX(constant)
- /***********************************************
- SDecimal class
- Representation for 1/DRADIX in BRADIX
- ************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- static SDecimal* invDrdx = NULL;
- static uint invDsize = 0;
-
- void DrdxFree(){
- if(invDsize == 0) return;
- delete invDrdx; invDrdx = NULL; invDsize = 0;
- }
-
- SDecimal BRecDRadix(){
- uint max_sz = SNManager::SNMaxSize(SNManager::BIN_DEC);
- if( invDsize >= max_sz ) return *invDrdx;
-
- SDecimal one;
- one.SetInt(1);
- delete[] invDrdx;
- invDrdx = new SDecimal;
- XsDiv(one, DRADIX, *invDrdx);
- invDsize = max_sz;
-
- return *invDrdx;
- }
sxcbrcdx.cpp : last modifiled at 2017/06/23 10:40:13(720 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).